package com.lagou.homework.stage2.no3;

/**
 * 通话套餐类，优化后继承抽象套餐类 Package
 */
public class CallPackage extends Package implements TalkService {

    private int talkTime; // 通话时长
    private int shortMessage; // 短信条数
//    private double rates; // 每月资费

    public CallPackage() {
    }

    public CallPackage(double rates, int talkTime, int shortMessage) {
        super(rates);
        this.talkTime = talkTime;
        this.shortMessage = shortMessage;
    }

    public int getTalkTime() {
        return talkTime;
    }
    public void setTalkTime(int talkTime) {
        this.talkTime = talkTime;
    }
    public int getShortMessage() {
        return shortMessage;
    }
    public void setShortMessage(int shortMessage) {
        this.shortMessage = shortMessage;
    }
//    public double getRates() {
//        return rates;
//    }
//    public void setRates(double rates) {
//        this.rates = rates;
//    }

    /**
     * 显示所有套餐信息
     */
    public void show(){
        System.out.println("通话时长："+getTalkTime()+", 短信条数："+getShortMessage()+", 每月资费："+ getRates());
    }

    @Override
    public void test1(int talkTime, MobileCard mobileCard) {
        System.out.println("test1---talkTime: " + talkTime);
        mobileCard.show();
    }
}
